#ifndef _NEPTUNER_TOKENIZER_H_
#define _NEPTUNER_TOKENIZER_H_

#include<string>
#include<vector>

class Token
{
public:
	enum Type
	{
		eTokenUnknown,
		eTokenKeyword,
		eTokenDelimiter,
		eTokenSymbol
	};

    std::string m_sValue;
	bool        m_bIsKeyword;
	bool        m_bIsDelimiter;

    Token()
    {
		m_sValue = "";
		m_bIsDelimiter = false;
		m_bIsKeyword   = false;
    }

    Token(char inChar)
    {
        m_sValue.push_back(inChar);
        //TODO Add check if really delimiter though it doesn't really matter
    }

	explicit Token(std::string in_sToken)
	{
		m_sValue = in_sToken;
	}

	Token(const Token& in_rxToken)
	{
		m_bIsDelimiter	= in_rxToken.m_bIsDelimiter;
		m_bIsKeyword	= in_rxToken.m_bIsKeyword;
		m_sValue		= in_rxToken.m_sValue;
	}

    operator char()
    {
        if(m_sValue.length()==1)
            return m_sValue[0];
        return '\0';
    }
};

class Tokenizer
{
public:
    std::vector<Token>      m_asTokens;
    static std::string      m_sDelimiters;
    
public:
    void tokenize(std::string inTokenStream);
    void print(void);
	void emitToken(std::string insToken);
	void tokenizeDelimiterStream(std::string inDelimiters);

    Tokenizer(void);
    ~Tokenizer(void);
};

#endif
